Hierarchical ecology